<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    function trian(row){
        for(var i=0;i<row;i++){
            for(var j=0;j<i+1;j++){
                document.write("*");
            }
            document.write("<br>");
        }
    }
    trian(7);

    trian(3);
    
    trian(9);

    trian(5);
</script>
</html>